package org.tote.command;

public abstract class AbstractListCommand {

	protected int page;
	protected boolean prevPage;
	protected boolean nextPage;
	protected String searchFilter;

	public AbstractListCommand() {
	}

	public AbstractListCommand(int page, boolean more) {
		this(page, more, "");
	}

	public AbstractListCommand(int page, boolean more, String searchFilter) {
		this.page = page;
		this.prevPage = (page > 0) ? true : false;
		this.nextPage = more;
		this.searchFilter = searchFilter;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public boolean isPrevPage() {
		return prevPage;
	}

	public void setPrevPage(boolean prevPage) {
		this.prevPage = prevPage;
	}

	public boolean isNextPage() {
		return nextPage;
	}

	public void setNextPage(boolean nextPage) {
		this.nextPage = nextPage;
	}

	public String getSearchFilter() {
		return searchFilter;
	}

	public void setSearchFilter(String searchFilter) {
		this.searchFilter = searchFilter;
	}

}
